package com.jstyle.jclife.activity;

import android.app.Activity;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.KeyEvent;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.jstyle.jclife.BuildConfig;
import com.jstyle.jclife.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class ProvicyActivity extends Activity {

    @BindView(R.id.tv_proivcy)
    TextView tvProivcy;
    @BindView(R.id.iv_icon)
    ImageView ivIcon;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.bt_agree)
    Button btAgree;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_provicy);
        ButterKnife.bind(this);
        tvProivcy.setText(BuildConfig.APPLICATION_ID.equals("com.nuband.gps") ? "" :
                Html.fromHtml(getString(R.string.provicy)));
        tvProivcy.setMovementMethod(LinkMovementMethod.getInstance());


    }

    private static final String TAG = "ProvicyActivity";
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event)  {
        if (keyCode == KeyEvent.KEYCODE_BACK) { //按下的如果是BACK，同时没有重复
            return true;
        }

        return super.onKeyDown(keyCode, event);
    }

    @OnClick(R.id.bt_agree)
    public void onViewClicked() {
        setResult(RESULT_OK);
        finish();
    }
}
